import 'package:flutter/material.dart';

class Page2 extends StatelessWidget {

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar:AppBar(
        title: Text("页面2"),
      ) ,
      body: Center(
        child: Center(
          child: Column(
            mainAxisAlignment: MainAxisAlignment.center,
            children: <Widget>[
              Text("页面2内容区域"),
              RaisedButton(
                child: Text("返回按钮1"),
                padding: EdgeInsets.all(10),
                color: Theme.of(context).accentColor,
                textTheme: ButtonTextTheme.primary,
                onPressed: (){
                  Navigator.of(context).pop("用户点了按钮1");
                },
              ),
              RaisedButton(
                child: Text("返回按钮2"),
                padding: EdgeInsets.all(10),
                color: Theme.of(context).accentColor,
                textTheme: ButtonTextTheme.primary,
                onPressed: (){
                  Navigator.of(context).pop("用户点了按钮2");
                },
              ),
            ],

          ),
        ),
      ),
    );
  }
}